This is an exposition of some basic mathematical aspects of quantum logic gates. At first we established some general formulas for the case of arbitrary quantum gate A with unique restriction A^2=I. The explicit form of the generators and roots of matrix A have been found . Then we apply general results to the particular cases of one-qubit and multi-qubit quantum gates. Some interesting properties of square roots of basic Pauli and Hadamard gates are demonstrated.